/**
 * Copyright 2013 ABSir's Studio
 * 
 * All right reserved
 *
 * Create on 2013-6-18 下午1:17:19
 */
package com.absir.android.inject;

import com.absir.android.view.InjectViewUtils;
import com.absir.bean.basis.Basis;
import com.absir.bean.basis.BeanDefine;
import com.absir.bean.basis.BeanFactory;
import com.absir.bean.basis.BeanScope;
import com.absir.bean.config.IBeanObjectProcessor;
import com.absir.bean.inject.value.Bean;

/**
 * @author absir
 * 
 */
@Basis
@Bean
public class InjectViewFactory implements IBeanObjectProcessor {

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.absir.core.kernel.KernelList.Orderable#getOrder()
	 */
	@Override
	public int getOrder() {
		// TODO Auto-generated method stub
		return 0;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.absir.bean.config.IBeanObjectProcessor#processBeanObject(com.absir
	 * .bean.basis.BeanFactory, com.absir.bean.basis.BeanScope,
	 * com.absir.bean.basis.BeanDefine, java.lang.Object, java.lang.Object)
	 */
	@Override
	public void processBeanObject(BeanFactory beanFactory, BeanScope beanScope, BeanDefine beanDefine, Object beanObject, Object beanProxy) {
		// TODO Auto-generated method stub
		InjectViewUtils.inject(beanObject, beanScope == BeanScope.PROTOTYPE, beanProxy);
	}
}
